var page_layout = function () {

    var initComponents = function () {
        //ICON
        feather.replace();
        //sidebar
        $('.nav-link').on('click', function (e) {
            var _this = $(this),
                _parent = _this.parent(),
                _toggle = _parent.attr('toggle');
            if (_toggle) {
                if (parseInt(_toggle))
                    $('.subnav-block').slideUp(300);
                else
                    $('.subnav-block').slideDown(300);
                _parent.attr('toggle', Math.abs(_toggle - 1));
            } else {
                $('.nav-link').removeClass('active');
                _this.addClass('active');
            }
        });

    };
    return {
        init: function () {
            initComponents();
        }
    }
}();

$(function () {
    page_layout.init();
});